<?php
// +---------------------------------------------------------------------------+
// | This file is part of the KnowledgebasePublisher package                   |
// | KnowledgebasePublisher - web based knowledgebase publisher tool           |
// |                                                                           |
// | Author:  Evgeny Leontev <eleontev@gmail.com>                              |
// | Copyright (c) 2005 Evgeny Leontev                                         |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code.                          |
// +---------------------------------------------------------------------------+

class KBClientAction_confirm extends KBClientAction_common
{

	function &execute($controller, $manager) {
	
		$user_id = $manager->isUser($this->rq->ec);
		if($user_id) {
		
			//if($manager->getSetting('register_approval')) {
			//	$sent = $manager->sendNotifyRegistration($this->rp->vars, $view);
			//	$controller->go('success_go', false, false, 'registration_confirmed_approve');
			
			//} else {
				$manager->setUserActive($user_id);
				$controller->go('success_go', false, false, 'registration_confirmed');		
			//}
	
		} else {
			$controller->go('success_go', false, false, 'registration_not_confirmed');
		}	
	}
	
}
?>